//Page Object
Page({
  data: {
    
  },
  //options(Object)
  onLoad: function(options){
    var tath = this;
    var buy_id = options.buy_id;
    console.log(options);
    //查看购买记录详情
    getApp().request({
      url: getApp().api.cardshop.buy_card_details,
      data: {
        buy_id: buy_id
      },
      success: function (t) {
        console.log(t, '购买记录详情');
        if (t.code == 1) {
          console.log(t.msg);
        } else {
          tath.setData({
            details: t.data,
          });
        }
      },
      complete: function () { }
    });
  },
  onReady: function(){
    
  },
  onShow: function(){
    
  },
  onHide: function(){

  },
  onUnload: function(){

  },
  onPullDownRefresh: function(){

  },
  onReachBottom: function(){

  },
  onShareAppMessage: function(){

  },
  onPageScroll: function(){

  },
  //item(index,pagePath,text)
  onTabItemTap:function(item){

  }
});